#!/bin/bash -e

cd $(dirname $0)/..
source ./auto/set-env-helpers

kustomize edit set image joidevops/app:${GIT_HASH} joidevops/migration:${GIT_HASH}
kustomize build . -o kustomize-output.yaml

kubectl apply -f k8s/kustomize-output.yaml

kubectl rollout status -w deployment/devops-joi
